package com.edu.bean;

import java.util.List;
import java.util.Map;

public class User{

    private int userId;

    private String username;

    private String password;

//    private int age;
//
//    private String sex;

//    public String getSex() {
//        return sex;
//    }
//
//    public void setSex(String sex) {
//        this.sex = sex;
//    }
//
//    public int getAge() {
//        return age;
//    }
//
//    public void setAge(int age) {
//        this.age = age;
//    }

    private List<String> nickName;

    private List<Car> carList;

    public Map<String, String> getRelations() {
        return relations;
    }

    public void setRelations(Map<String, String> relations) {
        this.relations = relations;
    }

    private Map<String,String> relations;

    public List<Car> getCarList() {
        return carList;
    }

    public void setCarList(List<Car> carList) {
        this.carList = carList;
    }

    public List<String> getNickName() {
        return nickName;
    }

    public void setNickName(List<String> nickName) {
        this.nickName = nickName;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        System.out.println("执行了userId的 setter方法");
        this.userId = userId;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public User() {
        System.out.println("执行了User 无参数的构造方法");
    }

    public User(int userId, String username, String password) {
        this.userId = userId;
        this.username = username;
        this.password = password;
    }

    public User(String username, String password) {
        this.username = username;
        this.password = password;
    }

    @Override
    public String toString() {
        return "User{" +
                "userId=" + userId +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", nickName=" + nickName +
                ", carList=" + carList +
                ", relations=" + relations +
                '}';
    }
}
